import * as types from '../constants/ActionTypes'

export function register (username, password, phone) {
  return {
    type: types.REGISTER,
    uname: username,
    pwd: password,
    phone: phone,
  };
}

export function registing (username, password, phone) {
  return {
    type: types.REGISTING,
    uname: username,
    pwd: password,
    phone: phone,
  };
}

export function registerSuccess (username, password) {
  return {
    type: types.REGISTERSUCCESS,
    uname: username,
    pwd: password,
  };
}

export function registerFail (errorMessage) {
  return {
    type: types.REGISTERFAIL,
    errorMessage: errorMessage,
  }
}
